home *** CD-ROM | disk | FTP | other *** search
/ Floppyshop 2 / Floppyshop - 2.zip / Floppyshop - 2.iso / diskmags / 5791-.end / dmg-6260 / articles / shell.doc < prev    next >
Text File  |  1993-06-26  |  1KB  |  39 lines

  1.                           DEMO SHELL SOURCE
  2.                          ~~~~~~~~~~~~~~~~~~~
  3.  
  4. Included on this disk  is  a  file  called  SHELL.BAS  which is a small
  5. program to help start you off  when  writing demos. It saves you having
  6. to type out the same things over and over again whenever you start on a
  7. new demo. (Can also be used for anything other than demos).
  8.  
  9. Here is the program:
  10.  
  11. 1 gosub 50000
  12. 2 rem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  13. 3 rem           INITIALISATION
  14. 4 rem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  15. 46 logic=back : gosub 50000
  16. 47 rem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  17. 48 rem           MAIN LOOP
  18. 49 rem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  19. 50 cls logic
  20. 90 H=hardkey
  21. 98 if H=57 then gosub 50000 : end : rem CLOSE DOWN
  22. 99 screen swap : wait vbl : goto 50
  23. 4997 rem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  24. 4998 rem           MESSAGES
  25. 4999 rem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  26. 50000 mode 0 : key off : hide : curs off : click off :
  27.       clear key : cls back : cls physic : cls logic
  28. 50009 return
  29.  
  30.  
  31. You put all of the basic initialisation  between lines 5 and 45, and on
  32. line 46 you do the final  initialisation  (ie. switch music and rasters
  33. on). The main loop is between  55  and 99. Ideally, this should consist
  34. solely of GOSUBS which branch out to each part of the demo. These parts
  35. should be from line 100 onwards.  Write  the scrolltext message on line
  36. 5000 and onwards.
  37.  
  38. Article: BLACK EAGLE 26/6/93
  39.